<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>代理人 </title>

    <meta name="keywords" content="">
    <meta name="description" content="">

   <link rel="shortcut icon" href="{$Think.const.RESOURCE}img/favicon.ico">
    <link href="{$Think.const.RESOURCE}css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="{$Think.const.RESOURCE}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.const.RESOURCE}css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="{$Think.const.RESOURCE}css/animate.css" rel="stylesheet">
    <link href="{$Think.const.RESOURCE}css/style.css?v=4.1.0" rel="stylesheet">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="{$Think.const.RESOURCE}css/font.css">
    <link rel="stylesheet" href="{$Think.const.RESOURCE}css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="{$Think.const.RESOURCE}lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="{$Think.const.RESOURCE}js/xadmin.js"></script>
    <script type="text/javascript" src="{$Think.const.RESOURCE}js/bootstrap-paginator.js"></script>
    <style>
        :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
            color: #b6b6b6; opacity:1;
        }

        ::-moz-placeholder { /* Mozilla Firefox 19+ */
            color: #b6b6b6;opacity:1;
        }

        input:-ms-input-placeholder{
            color: #b6b6b6;opacity:1;
        }

        input::-webkit-input-placeholder{
            color: #b6b6b6;opacity:1;
        }
    </style>
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div class="row" style="height:260px;">
    <div class="col-md-4 text-right" style="background-color: #f4dfa9;margin-right: 10px;height:150px;">
        <h2 class="text-center">设置用户级别</h2>
            <div class="col-md-8">
                <div class=" form-group ">
                    <div class=" input-group ">
                        <span class="input-group-addon ">级别*</span>
                        <select name="level" id="level">
                            <option value="1" <?php echo  $lists[0]['userKind']=='0'?'selected':''; ?> >普通玩家</option>                            
                            <option value="2" <?php echo  $lists[0]['userKind']=='2'?'selected':''; ?> >推广</option>                            
                            <option value="3" <?php echo  $lists[0]['userKind']=='3'?'selected':''; ?> >渠道</option>                            
                            <option value="4" <?php echo  $lists[0]['userKind']=='1'?'selected':''; ?> >代理</option>                            
                        </select>
                        <input   type="hidden" class="form-control required" value="{$gameid}"  id="gameid">
                    </div>
                </div>
            </div>
            <div class="col-md-2 text-center">
                <button type="button"  id="sends"  class="btn btn-danger btn_sub">设置</button>
            </div>
        
    </div>
   
</div>
<!-- 全局js -->
<script src="{$Think.const.RESOURCE}js/jquery.min.js?v=2.1.4"></script>
<script src="{$Think.const.RESOURCE}js/bootstrap.min.js?v=3.3.6"></script>
<script src="{$Think.const.RESOURCE}js/plugins/sweetalert/sweetalert.min.js"></script>
<script type="text/javascript" src="{$Think.const.RESOURCE}js/content.js"></script>
<script>
    $(function(){
            $('#sends').click(function(){
                layer.confirm('您确定要设置么？', {
                btn : [ '确定', '取消' ]//按钮
                }, function(index) {
                    var gameid=$("#gameid").val();  //gameid
                    var level=$("#level").val();    //级别
                    $.ajax({
                         type: "GET",
                         url:"/member/design_dali",
                         data: {gameid:gameid,level:level},
                         dataType: "json",
                         success: function(data){
                             if  (data.code =='success') {  
                                layer.msg('设置成功!',{icon:1,time:1000});
                                window.location.reload();
                              }else{  
                                  layer.msg(data.code,{icon:2,time:1000});
                              }       
                         }
                    });   
                });  
            });
    });
</script>

</body>

</html>